MKDIR:=mkdir -p
OUTDIR:=build
BIN:=$(OUTDIR)/cf_sys
ZCC:=zcc +z80 --no-crt -v -m -Ca-f0xFF
APPMAKE:=z88dk-appmake

all: $(OUTDIR) $(BIN)

$(OUTDIR):
	$(MKDIR) $@

$(BIN):
	$(ZCC) @cf.lst -o $@
	$(APPMAKE) +glue -b $@ --ihex --pad --filler 0x00 --recsize 24 --clean

.PHONY: clean
clean:
	rm -rf $(OUTDIR)/*
